
package com.aforce3.trailertracer;

import java.awt.image.BufferedImage;

import com.aforce3.trailertracer.scenes.Scene;
import com.aforce3.trailertracer.scenes.SceneGroup;

public class Frame
{
	/** Average number of passes **/
	double passes = 0;
	
	/** The next pixel to be rendered **/
	long pixel = 0;

	/** Memory representation of the current frame **/
	final BufferedImage image;
	
	public static final int depth = 3;
	
	SceneGroup scene;
	Camera camera;
	
	public Frame(BufferedImage image, Camera camera, SceneGroup scene)
	{
		this.image = image;
		this.camera = camera;
		this.scene = scene;
	}
	
	public BufferedImage getImage()
	{
		return image;
	}
	
	public Scene getScene()
	{
		return scene;
	}
	
	public Camera getCamera()
	{
		return camera;
	}
	
	public synchronized void completed(double passes)
	{
		this.passes += passes;
	}
	
	public synchronized double getPassesCompleted()
	{
		return this.passes;
	}
}

